<div class="AdminMarket">
	<h1 class="list">{{!Possible market item features, by category}}</h1>

	<div class="what-to-do">
	<ul class="pre">
		<li><a href="{{action}}?mode=fields_recalc">{{!Rebuild all cached fields for all market items}}</a></li>
	</ul>
	</div>
	
	<table class="table">
	<thead>
		<tr>
			<th>{{!Category}}</th>
			<th>{{!Feature groups}}</th>
			<th>{{!Features}}</th>
		</tr>
	</thead>
	<tbody>

		<tr class="split">
			<td>{{!For all categories}}</td>
			<td><a href="/admin-AutoAdminMarketFieldGroup/?category_id=">{{!Edit}}</a> ({{public_groups.length}})</td>
			<td>
				{{if public_groups.length}}{{!Edit:}}{{/if}}
				{{foreach g in public_groups}}
					<a href="/admin-AutoAdminMarketField/?group_id={{g.id}}">{{g.name}} ({{g.cnt}})</a>
				{{/foreach}}
			</td>
		</tr>


	{{foreach c in market_categories}}
		<tr>
			<td style="padding-left: {{MUL1(30):c.level}}px">{{c.name}}</td>
			<td><a href="/admin-AutoAdminMarketFieldGroup/?category_id={{c.id}}">{{!Edit}}</a> ({{c.groups.length}})</td>
			<td>
				{{if c.groups.length}}{{!Edit:}}{{/if}}
				{{foreach g in c.groups}}
					<a href="/admin-AutoAdminMarketField/?group_id={{g.id}}">{{g.name}} ({{g.cnt}})</a>
				{{/foreach}}
			</td>
		</tr>
		{{/foreach}}
	</tbody>
	</table>
</div>
